Support flags in Fiddle::MemoryView.new and .export#209
Merged
Conversation
kou
approved these changes
Jul 24, 2026
Comment on lines
+328
to
+336
| rb_define_const(rb_cMemoryView, "SIMPLE", INT2NUM(RUBY_MEMORY_VIEW_SIMPLE)); | ||
| rb_define_const(rb_cMemoryView, "WRITABLE", INT2NUM(RUBY_MEMORY_VIEW_WRITABLE)); | ||
| rb_define_const(rb_cMemoryView, "FORMAT", INT2NUM(RUBY_MEMORY_VIEW_FORMAT)); | ||
| rb_define_const(rb_cMemoryView, "MULTI_DIMENSIONAL", INT2NUM(RUBY_MEMORY_VIEW_MULTI_DIMENSIONAL)); | ||
| rb_define_const(rb_cMemoryView, "STRIDES", INT2NUM(RUBY_MEMORY_VIEW_STRIDES)); | ||
| rb_define_const(rb_cMemoryView, "ROW_MAJOR", INT2NUM(RUBY_MEMORY_VIEW_ROW_MAJOR)); | ||
| rb_define_const(rb_cMemoryView, "COLUMN_MAJOR", INT2NUM(RUBY_MEMORY_VIEW_COLUMN_MAJOR)); | ||
| rb_define_const(rb_cMemoryView, "ANY_CONTIGUOUS", INT2NUM(RUBY_MEMORY_VIEW_ANY_CONTIGUOUS)); | ||
| rb_define_const(rb_cMemoryView, "INDIRECT", INT2NUM(RUBY_MEMORY_VIEW_INDIRECT)); |
Member
There was a problem hiding this comment.
Could you move rb_define_const()s between rb_define_alloc_func() and rb_define_singleton_method()?
himura467
force-pushed
the
memory-view-flags
branch
from
July 24, 2026 04:06
8d1ad11 to
210ac2d
Compare
Member
|
Could you resolve conflicts? |
Accept an optional `flags` argument, expose the flag values as constants, and reject unsupported flags in `Fiddle::Pointer`'s provider.
himura467
force-pushed
the
memory-view-flags
branch
from
July 24, 2026 06:31
210ac2d to
09606d4
Compare
Contributor
Author
|
@kou |
Member
|
Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Accept an optional
flagsargument, expose the flag values as constants, and reject unsupported flags inFiddle::Pointer's provider.